package org.yenn.pattern.aliyun.j2ee.businessdelegate;

import org.yenn.pattern.aliyun.j2ee.businessdelegate.impl.EJBService;
import org.yenn.pattern.aliyun.j2ee.businessdelegate.impl.JMSService;

/**
 * @Author: yerenyun
 * @Description: 步骤 3 创建业务查询服务。
 */
public class BusinessLookUp {
    public BusinessService getBusinessService(String serviceType) {
        if (serviceType.equalsIgnoreCase("EJB")) {
            return new EJBService();
        } else {
            return new JMSService();
        }
    }
}